export default {
  // 开启命名空间
  namespaced: true,
  state () {
    return {
      token: localStorage.getItem('geek-store-token')
    }
  },
  mutations: {
    setToken (state, newToken) {
      state.token = newToken // 把当前仓库的token更新了
      localStorage.setItem('geek-store-token', newToken) // 更新到本地存储
    }
  }
}
